local stupid_mode_plugin = require('sknvim.util').stupid_mode_plugin

require('lazy').setup({
    -- look
    require("sknvim.plugin.lualine").lazy_def,
    require("sknvim.plugin.indentline").lazy_def,
    -- { "https://github.com/lilydjwg/colorizer" },
    {
        "https://github.com/norcalli/nvim-colorizer.lua",
        main = "colorizer",
        events = "VeryLazy",
        opts = {
            '*',
            javascript = { css = true },
            css = { css = true },
        },
    },

    -- utils
    require("sknvim.plugin.neotree").lazy_def,
    { "https://github.com/itmammoth/doorboy.vim" },
    {
        "https://github.com/mbbill/undotree",
        keys = require("sknvim.keybinds").undotree
    },
    {
        "https://github.com/sbdchd/neoformat",
        keys = require("sknvim.keybinds").neoformat
    },
    {
        "https://github.com/aveplen/ruscmd.nvim",
        event = "VeryLazy",
        opts = require "sknvim.plugin.ruscmd"
    },
    require("sknvim.plugin.todo-comments").lazy_def,
    { "https://github.com/tpope/vim-commentary" },
    require('sknvim.plugin.vgit').lazy_def,
    { "https://github.com/williamboman/mason.nvim", opts = {} },
    {
        "https://github.com/williamboman/mason-lspconfig.nvim",
        dependencies = { "https://github.com/neovim/nvim-lspconfig" },
        opts = {
            ensure_installed = {
                "clangd", "lua_ls", "jedi_language_server", "html", "cssls",
                "bashls", "zls", "texlab", "ltex"
            },
        }
    },
    { "https://github.com/RubixDev/mason-update-all", opts = {} },
    {
        "https://github.com/akinsho/toggleterm.nvim",
        version = '*',
        opts = require("sknvim.plugin.toggleterm").config,
        keys = require('sknvim.keybinds').terminal
    },

    -- completition
    require("sknvim.plugin.cmp").lazy_def,
    require("sknvim.plugin.nvim-treesitter").lazy_def,
    {
        "https://github.com/ThePrimeagen/refactoring.nvim",
        dependencies = {
            "https://github.com/nvim-lua/plenary.nvim",
            "https://github.com/nvim-treesitter/nvim-treesitter"
        },
        keys = require("sknvim.keybinds").refactor,
        opts = {},
    },
    { "https://github.com/smjonas/inc-rename.nvim", opts = {} },
    {
        "https://github.com/nvim-telescope/telescope.nvim", branch = "0.1.x",
        dependencies = { "https://github.com/nvim-lua/plenary.nvim" },
        keys = require("sknvim.keybinds").telescope
    },

    -- stupid mode only
    stupid_mode_plugin({
        "https://github.com/folke/which-key.nvim",
        event = "VeryLazy",
        init = function()
            vim.o.timeout = true
            vim.o.timeoutlen = 300
        end,
        opts = {}
    }),
    stupid_mode_plugin({
        "https://github.com/folke/trouble.nvim",
        dependencies = { "https://github.com/nvim-tree/nvim-web-devicons" },
        opts = {},
    }),
}, require('sknvim.etc.lazy_config'))
